<template>
	<view class="wf-box">
		<HeadNav titleName="钱包" :navBarHeight="navBarHeight" @rightClick="openPopup">
			<template v-slot:rightIcon>
				<image src="../../static/img/me-28.png" class="add-icon"></image>
			</template>
		</HeadNav>
		
		<view class="main" :style="{ paddingTop: navBarHeight }">
			<view class="general-wrap">
				<view class="gen-lt">
					<view class="ft-sa">概括</view>
					<view class="ft-sc">$0.00</view>
					<view class="ft-sd">$0.00(+0.000%)今天</view>
				</view>
				<view class="gen-rt">
					<image src="../../static/img/me-57.png"></image>
				</view>
			</view>
			
			<view class="wallet-wrap">
				<view class="wallet-tit">您的钱包</view>
				
				<view class="wallet-scroll">
					<scroll-view class="scroll-view-y" scroll-y="true">
						<view class="scroll-view-item" v-for="item in 6">
							<image src="../../static/img/demo-04.png" class="wall-img"></image>
							<view class="wall-info">
								<view class="wall-info-up">
									<view>$0.00</view>
									<view>+0.000%</view>
								</view>
								<view class="wall-info-down">
									<text>Wallet</text>
									<text>0x6c9221...2536njkoFAC</text>
								</view>
							</view>
							<image src="../../static/img/chat-32.png" class="wall-more"></image>
						</view>
					</scroll-view>
				</view>
			</view>
		</view>
		
		<uni-popup ref="popup" background-color="transparent" type="bottom">
			<view class="add-box">
				<view class="add-title"></view>
				<view class="add-pd">
					<view class="opt-item" @click="jumpManageWallet">
						注册
					</view>
					<view class="opt-item">
						导入钱包
					</view>
				</view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import navBarMixin from '@/mixin/navBarMixin.js'
	import HeadNav from "@/components/HeadNav"
	export default {
		data() {
			return {}
		},
		components: {
			HeadNav
		},
		mixins: [navBarMixin],
		methods: {
			openPopup() {
				this.$refs.popup.open()
			},
			jumpManageWallet() {
				this.$refs.popup.close()
				
				uni.navigateTo({
					url: '/pages/me/manageWallet'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wf-box {
		overflow: hidden;
		padding-bottom: 36rpx;
		
		.add-icon {
			width: 40rpx;
			height: 40rpx;
		}
	
		.main {
			margin-top: 126rpx;
			padding: 0 30rpx;
			.general-wrap {
				display: flex;
				justify-content: space-between;
				padding: 30rpx;
				// height: 240rpx;
				background: #fff;
				border-radius: 10rpx;
				.gen-lt {
					display: flex;
					flex-direction: column;
					justify-content: space-between;
					.ft-sa {
						color: #333;
						font-size: 32rpx;
						font-weight: bold;
					}
					.ft-sc {
						color: #3D3D3D;
						font-size: 50rpx;
						font-weight: bold;
					}
					.ft-sd {
						font-size: 28rpx;
						color: $theme-color-a;
					}
				}
				.gen-rt {
					image {
						width: 248rpx;
						height: 170rpx;
					}
				}
			}
			.wallet-wrap {
				padding: 30rpx;
				margin-top: 30rpx;
				background: #fff;
				.wallet-tit {
					font-size: 32rpx;
				}
				.wallet-scroll {
					height: 700rpx;
					.scroll-view-y {
						height: 100%;
						overflow: hidden;
						.scroll-view-item {
							height: 140rpx;
							display: flex;
							align-items: center;
							border-bottom: 2rpx solid #eee;
							.wall-img {
								width: 70rpx;
								height: 70rpx;
							}
							.wall-info {
								flex: 1;
								margin: 0 26rpx;
								.wall-info-up {
									display: flex;
									justify-content: space-between;
									view:first-child {
										font-size: 28rpx;
										color: #333;
										font-weight: bold;
									}
									view:last-child {
										font-size: 24rpx;
										color: $theme-color-a;
									}
								}
								.wall-info-down {
									text:first-child {
										padding-right: 20rpx;
										margin-right: 10rpx;
										color: #666666;
										border-right: 2rpx solid #666;
									}
									text:last-child {
										color: #666;
										font-size: 24rpx;
									}
								}
							}
							.wall-more {
								width: 10rpx;
								height: 20rpx;
							}
						}
					}
				}
			}
		}
	
		.add-box {
			min-height: 300rpx;
			background-color: #fff;
			border-radius: 24rpx 24rpx 0 0;
			position: relative;
			overflow: hidden;
		
			.add-title {
				position: relative;
				height: 150rpx;
				line-height: 160rpx;
				text-align: center;
				color: #333;
				font-size: 32rpx;
				font-weight: bold;
				background: linear-gradient(180deg, #EBF3FF 0%, #FFFFFF 100%);
			}
		
			.add-pd {
				position: absolute;
				top: 100rpx;
				width: 100%;
				padding: 0 30rpx;
				box-sizing: border-box;
		
				.opt-item {
					height: 80rpx;
				}
			}
		}
	}
</style>